package com.lpwa.system.domain;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.lpwa.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 标签数据表 tag_latest_data
 * 
 * @author tanmu
 * @date 2019-06-22
 */
public class TagLatestData extends BaseEntity
{
	private static final long serialVersionUID = 1L;
	
	/** ID */
	private Long id;
	/** 标签ID */
	private String tagId;
	/** 数据产生时间 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date lastPacketTS;
	/** 位置信息时间 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date positionTS;
	/** X */
	private BigDecimal x;
	/** Y */
	private BigDecimal y;
	/** Z */
	private BigDecimal z;
	/** 电池电量 */
	private BigDecimal batteryVoltage;
	/** 电池电量对应的时间 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date batteryVoltageTS;
	/** 信号强度 */
	private Integer rssi;
	/** 采集信号强度的对应基站ID */
	private String rssiLocator;
	/** 报警状态 */
	private String status;
	/** 传感类型 */
	private String sensorType;
	/** 传感值 */
	private Integer sensorData;
	/** 人员ID */
	private String personId;

	public Date getPositionTS() {
		return positionTS;
	}

	public void setPositionTS(Date positionTS) {
		this.positionTS = positionTS;
	}

	public void setId(Long id)
	{
		this.id = id;
	}

	public Long getId() 
	{
		return id;
	}
	public void setTagId(String tagId) 
	{
		this.tagId = tagId;
	}

	public String getTagId() 
	{
		return tagId;
	}
	public void setLastPacketTS(Date lastPacketTS) 
	{
		this.lastPacketTS = lastPacketTS;
	}

	public Date getLastPacketTS() 
	{
		return lastPacketTS;
	}
	public void setX(BigDecimal x) 
	{
		this.x = x;
	}

	public BigDecimal getX() 
	{
		return x;
	}
	public void setY(BigDecimal y) 
	{
		this.y = y;
	}

	public BigDecimal getY() 
	{
		return y;
	}
	public void setZ(BigDecimal z) 
	{
		this.z = z;
	}

	public BigDecimal getZ() 
	{
		return z;
	}
	public void setBatteryVoltage(BigDecimal batteryVoltage) 
	{
		this.batteryVoltage = batteryVoltage;
	}

	public BigDecimal getBatteryVoltage() 
	{
		return batteryVoltage;
	}
	public void setBatteryVoltageTS(Date batteryVoltageTS) 
	{
		this.batteryVoltageTS = batteryVoltageTS;
	}

	public Date getBatteryVoltageTS() 
	{
		return batteryVoltageTS;
	}
	public void setRssi(Integer rssi) 
	{
		this.rssi = rssi;
	}

	public Integer getRssi() 
	{
		return rssi;
	}
	public void setRssiLocator(String rssiLocator) 
	{
		this.rssiLocator = rssiLocator;
	}

	public String getRssiLocator() 
	{
		return rssiLocator;
	}
	public void setStatus(String status) 
	{
		this.status = status;
	}

	public String getStatus() 
	{
		return status;
	}
	public void setSensorType(String sensorType) 
	{
		this.sensorType = sensorType;
	}

	public String getSensorType() 
	{
		return sensorType;
	}
	public void setSensorData(Integer sensorData) 
	{
		this.sensorData = sensorData;
	}

	public Integer getSensorData() 
	{
		return sensorData;
	}
	public void setPersonId(String personId) 
	{
		this.personId = personId;
	}

	public String getPersonId() 
	{
		return personId;
	}

    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("tagId", getTagId())
            .append("lastPacketTS", getLastPacketTS())
            .append("x", getX())
            .append("y", getY())
            .append("z", getZ())
            .append("batteryVoltage", getBatteryVoltage())
            .append("batteryVoltageTS", getBatteryVoltageTS())
            .append("rssi", getRssi())
            .append("rssiLocator", getRssiLocator())
            .append("status", getStatus())
            .append("sensorType", getSensorType())
            .append("sensorData", getSensorData())
            .append("personId", getPersonId())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
